package com.mz.demo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

@Data
@Accessors(chain = true)
public class SysRole {

    @TableId( type= IdType.ASSIGN_ID )
    private Long id;
    private String roleName;
    private String roleCode;

    @TableField( exist = false )
    private List<SysPermission> permissionList;

    @JsonIgnore
    @TableLogic
    private Integer delFlag;

    @JsonFormat( pattern = "YYYY-MM-DD HH:mm:ss")
    @TableField( fill = FieldFill.INSERT)
    private Date createTime;
}
